package com.ryskoo.catering.productspec.domain;

import com.ryskoo.framework.core.bean.BasicPO;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 商品规格，会影响菜品价格的
 * 目前就对应菜品的套餐（大份，小份，中份）
 *
 * @author JackHou
 */
@Entity
@Table(name = "cater_product_spec")
public class ProductSpecPO extends BasicPO {
    /* 所属商品uuid */
    @Column(name = "product_uuid", columnDefinition = "char", length = 32)
    private String productUuid;
    /* 规格名称 */
    @Column(name = "name", columnDefinition = "varchar", length = 30)
    private String name;
    /* 库存 */
    @Column(name = "stock", columnDefinition = "int")
    private Integer stock;
    /* 价格 */
    @Column(name = "price", columnDefinition = "decimal", length = 11, precision = 2)
    private double price;
    /* 是否是默认规格 1-是，0-不是 */
    @Column(name = "spec_default")
    private boolean isDefault = false;

    /* 是否售罄 1-是，0-否 */
    @Column(name = "is_sell_out")
    private boolean isSellOut = false;

    public String getProductUuid() {
        return productUuid;
    }

    public void setProductUuid(String productUuid) {
        this.productUuid = productUuid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public boolean isDefault() {
        return isDefault;
    }

    public void setDefault(boolean aDefault) {
        isDefault = aDefault;
    }

    public boolean isSellOut() {
        return isSellOut;
    }

    public void setSellOut(boolean sellOut) {
        isSellOut = sellOut;
    }
}
